package com.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.beans.CartInfo;
import com.mapper.CartMapper;
import com.service.CartService;

@Service @Transactional
public class CartServiceImpl implements CartService{
	@Resource
	private  CartMapper cartMapper;

	public int addCart(CartInfo cart) {
		return cartMapper.add_cart(cart);
	}

	public int delCart(int id) {
		return cartMapper.del_cart(id);
	}

	public int updateCart(CartInfo cart) {
		return cartMapper.update_cart(cart);
	}

	public CartInfo getCart(int id) {
		return cartMapper.get_cart(id);
	}

	public List<CartInfo> select_all() {
		return cartMapper.select_all();
	}

}
